jQuery(document).ready(function () {
    $(function () {
        $("#div_guestbook_check").hide();
        $(".guestbook_form_submit_button").click(function () {
            var a = $("textarea#guestbook_textarea").val(),
                b = "guestbook_textarea=" + a;
            if (a == "") {
                $("#div_guestbook_check").html("Enter Your comment, please!");
                $("#div_guestbook_check").show();
                return false
            }
            $.ajax({
                type: "POST",
                url: "./scripts/guestbook.php",
                data: b,
                success: function () {
                    document.getElementById("guestbook_form").reset();
                    $.modal.close();
					$("#load_pt_guestbook_demo").load("./scripts/load_pt_guestbook.php?load=posts&limit=100");
                }
            });
            return false
        })
    })
});
